In today's information age, the various network devices in a communication network utilize numerous protocols for exchanging information. These protocols are typically implemented in layers, which are often referred to collectively as a “protocol stack.” Each protocol layer in the protocol stack provides services to the protocol layer above it in the protocol stack and consumes services from the protocol layer below it in the protocol stack.
Many protocol stacks use a message passing architecture for passing protocol messages between protocol layers. In particular, queues are typically used to transfer protocol messages between a particular protocol layer and its adjacent protocol layers. When a lower layer protocol needs to forward a protocol message to an upper layer protocol, the lower layer protocol places the protocol message on a queue corresponding to the upper layer protocol.
One advantage of such a message passing architecture is that the protocol message order is maintained. Since a queue is a first-in-first-out (FIFO) mechanism, protocol messages are removed from the queue in the same order that the protocol messages are placed into the queue. The lower layer protocol places protocol messages into the queue in the order in which the protocol messages are received. Therefore, the upper layer protocol removes the protocol messages from the queue in the order in which the protocol messages are received.
One disadvantage of such a message passing architecture is that there is no consideration for protocol message priority. Almost invariably, certain types of protocol messages are more important than others, and are therefore preferably processed ahead of less important protocol messages. Unfortunately, when a queue is used for message passing, the lower layer protocol places high priority protocol messages and low priority protocol messages on the queue in the order in which they are received, and therefore the high priority protocol messages continue to be processed in the order in which they are received rather than being processed ahead of earlier low priority messages.
One way to provide priority forwarding for protocol messages is to utilize two (2) queues, namely a high priority message queue and a low priority message queue. The lower layer protocol places high priority protocol messages on the high priority message queue, and places low priority protocol messages on the low priority message queue. The upper layer protocol processes all protocol messages in the high priority message queue before processing any protocol messages in the low priority queue. In this way, the high priority protocol messages are processed ahead of earlier low priority messages.
In order to support such a priority forwarding mechanism, the lower layer protocol must be able to determine a priority for each protocol message that it forwards to the upper layer protocol. Typically, the lower layer protocol logic is modified to interpret certain protocol elements of the upper layer protocol in order to determine a priority for each protocol message. This adds complexity to the lower layer protocol, and makes the upper layer protocol dependent on the specific lower layer protocol for receiving priority forwarding services.
Thus, there is a need for an improved priority forwarding mechanism.